package com.yfp.system.api;

import com.yfp.common.core.constant.SecurityConstants;
import com.yfp.common.core.constant.ServiceNameConstants;
import com.yfp.common.core.domain.R;
import com.yfp.system.api.factory.RemoteBrowserLoginFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 用户服务
 *
 * @author ruoyi
 */
@FeignClient(contextId = "remoteBrowserLoginService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteBrowserLoginFallbackFactory.class)
public interface RemoteBrowserLoginService {


    @GetMapping("/browser/first/{token}")
    R<Integer> isFirstBrowserLogin(@PathVariable("token") String token, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PutMapping("/browser/first/{token}")
    R<Boolean> addBrowserLogin(@PathVariable("token") String token, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
